from math import lgamma


class LoginPage:
    def __init__(self, username, password, code):
        self.username = username
        self.password = password
        self.code = code
        self.btn = '登录'

    def __str__(self):
        return f'用户名：{self.username}，密码：{self.password}，验证码：{self.code}，点击：{self.btn}'

    def login(self):
        print(f'用户名：{self.username}，密码：{self.password}，验证码：{self.code}，点击：{self.btn}')


lg1 = LoginPage('admin', '888888', '123456')
print('登录1-ins：', lg1)
# class HorstItem:
#     """家具类名"""
#     def __init__(self, name, area):
#         """添加属性"""
#         self.name = name
#         self.area = area
#
#     def __str__(self):
#         return f'家具名字:{self.name},面积:{self.area}m^2'
#
# class Horse:
#     """房子类"""
#     def __init__(self, name, area):
#         self.name = name
#         self.total_area = area
#         self.free_area = area
#         self.item_list = []
#     def __str__(self):
#         return (f'房子名字：{self.name}，房子面积：{self.total_area}，剩余面积：{self.free_area}，'
#                 f'家具列表：{self.item_list}')
#     def add_item(self, item):
#         area = self.free_area - item.area
#         if area >= 0:
#             self.item_list.append(item.name)
#             self.free_area -= item.area
#             print(f'添加成功:{item.name}')
#         else:
#             print('家里没空间了，换大房子吧')
#
#
# bedIns = HorstItem('西蒙丝', 4)
# chestIns = HorstItem('衣柜', 2)
# tableIns = HorstItem('餐桌', 1.2)
#
# h1 = Horse('上坡', 5.4)
# h1.add_item(chestIns)
#
#
# print('ins1:', bedIns)
# print('ins2:', chestIns)
# print('ins3:', tableIns)
# print('h1:', h1)
# h1.add_item(bedIns)
# print('添加完以后h1：', h1)
# h1.add_item(chestIns)
# print('添加完以后h1：', h1)
# h1.add_item(tableIns)
# print('添加完以后h1：', h1)
